home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / me_cd25.zip / BOBSMUTT.ZIP / MSDOSCMD.MUT < prev    next >
Text File  |  1992-05-16  |  708b  |  43 lines

  1.   ;; $Source: c:/lib/mutt/RCS/msdoscmd.mut $
  2.   ;; $Revision: 1.1 $
  3.   ;; $Date: 1992/05/16 08:02:18 $
  4.   ;; Bob Stocker Public Domain
  5.   
  6. (include me2.h)
  7.  
  8. (defun
  9.   msdos-command
  10. {                    ;; BEGIN msdos-command
  11.   (const DOSbuf '*MS-DOS-output*')
  12.   (string cmd)
  13.   (int bufid)
  14.   (cmd (ask "MS-DOS command: "))
  15.   (bufid (attached-buffer DOSbuf))
  16.   (if
  17.     (== bufid -2)
  18.     (bufid
  19.       (create-buffer
  20.         DOSbuf
  21.     (bit-or
  22.       BFNoCare
  23.       BFImmortal
  24.     )
  25.       )
  26.     )
  27.   )
  28.   (current-buffer bufid)
  29.   (end-of-buffer)
  30.   (use-existing-buffer DOSbuf)
  31.   (insert-text '-> ' cmd)
  32.   (newline)
  33.   (OS-filter
  34.     cmd
  35.     -1
  36.     -1
  37.     TRUE
  38.   )
  39.   (update)
  40. }                    ;; END   msdos-command
  41. )
  42.  
  43.